/*
根据不同国别展示不同的币种文案，默认'￥'
*/

import React from 'react';

import { SINGAPORE_CODE, CHINA_CODE } from '@/pages/SalaryManage/constant/countryRegion';

const CurrencyTextArr = [
    {
        countryCode: SINGAPORE_CODE,
        text: 'S$'
    },
    {
        countryCode: CHINA_CODE,
        text: '￥'
    }
];

const CurrencyText = ({ countryCode }) => (
    <span>{countryCode ? CurrencyTextArr.find(n => n.countryCode === countryCode)?.text : '￥'}</span>
);

CurrencyText.defaultProps = {
    countryCode: ''
};

export default CurrencyText;
